#ifndef DBFILE_H
#define DBFILE_H

#include "GenericDBFile.h"
#include "TwoWayList.h"
#include "Record.h"
#include "Schema.h"
#include "File.h"
#include "Comparison.h"
#include "ComparisonEngine.h"


typedef enum {heap, sorted, tree} fType;

// stub DBFile header..replace it with your own DBFile.h

class DBFile {

private:
    int curPageInFile;
//    File dbFile;
//    Page dbPage;
    fType type;
    Record curRecord;
    GenericDBFile* myInternalVar;

public:
    File dbFile;
    Page dbPage;
	DBFile ();

	int Create (char *f_path, fType f_type, void *startup);
	int Open (char *f_path);
	int Close ();

	void Load (Schema &f_schema, char *loadpath);

	void MoveFirst ();
	void AdditionAddPage();
	void Add (Record &addme);
	int GetNext (Record &fetchme);
	int GetNext (Record &fetchme, CNF &cnf, Record &literal);

};
#endif
